﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Tunnel.Tools.FcmsTools;

namespace Tunnel.Devices.DeviceEntity
{
    public partial class FCMS : DeviceBase
    {
        public FCMS()
        {
            InitializeComponent();
            this.Size = new Size(90, 90);
            this.DoubleClick += FCMS_Click;
        }

        private void FCMS_Click(object sender, EventArgs e)
        {
            FcmsForm fcmsForm = new FcmsForm(this.DeviceId);
            fcmsForm.ShowDialog();
        }


        public override string StatusDescription
        {
            get
            {
                return base.StatusDescription;
            }

            set
            {
                switch (value)
                {
                    case "正常":
                        {
                            this.Image = ResPic.情报板正常;
                        }
                        break;
                    case "故障":
                        {
                            this.Image = ResPic.情报板故障;
                        }
                        break;
                }
                base.StatusDescription = value;
            }
        }

        public override void SendCommand(CommandType commandType)
        {
            throw new NotImplementedException();
        }

        protected override void OnPaint(PaintEventArgs pe)
        {
            base.OnPaint(pe);
        }
    }
}
